The date functions in SQL usually use the abbreviation of daypart.
Value
SQL Server)
(Access and Asp)
Description
Year
YY
Yyyy
1753 ~ 9999
Quarter
Qq
Q
Season 1 ~ 4
CONVERT (Data_type,expression[,style])CONVERT (varchar (10), field name, conversion format)
DescriptionThis style is generally in the type of time (datetime,smalldatetime) and String type (Nchar,nvarchar,char,varchar)When they are converted to each
UF Maintenance Common SQL Statement Script (Classic) (top) UF maintenance Staff Common SQL script--Query the UF version number use Ufsystem go select * from Ua_version go------------------------------ -------------------------------------View System
Select GETDATE() as 'Current Date', Datename( Year,GetDate()) as 'years', Datename(Month,GetDate()) as 'Month', Datename( Day,GetDate()) as 'Day', Datename(DW,GetDate()) as 'Week', Datename(Week,GetDate()) as 'Week number',
Select GETDATE () as ' current date ',Datename (Year,getdate ()) as ' year ',Datename (Month,getdate ()) as ' month ',Datename (Day,getdate ()) as ' Day ',Datename (Dw,getdate ()) as ' Week ',Datename (Week,getdate ()) as ' Week number ',Datename
Select GETDATE () as ' current date ',Datename (Year,getdate ()) as ' year ',Datename (Month,getdate ()) as ' month ',Datename (Day,getdate ()) as ' Day ',Datename (Dw,getdate ()) as ' Week ',Datename (Week,getdate ()) as ' Week number ',Datename
Select GETDATE () as ' current date ',Datename (Year,getdate ()) as ' year ',Datename (Month,getdate ()) as ' month ',Datename (Day,getdate ()) as ' Day ',Datename (Dw,getdate ()) as ' Week ',Datename (Week,getdate ()) as ' Week number ',Datename
1. Get the current timeSELECT GETDATE () as ' current date ', Datename (year, GETDATE ()) as ' Years ', datename (month, GETDATE ()) as ' month ', Datename (Day, GETDATE ()) as ' Days ', Datename (DW, GETDATE ()) as ' Week ', Datename (week,
Start the visual editor from Shell
VI filename indicates the shell to start the VI editor and pass the filename parameter to it. If the file exists, the VI editor interprets it as the file to be opened. If the file does not exist, the VI compiler
Reference:http://www.cnblogs.com/coconut_zhang/archive/2009/02/02/1382598.htmlHttp://blog.itpub.net/14766526/viewspace-1156100/Select GETDATE () as ' current date ',Datename (Year,getdate ()) as ' year ',Datename (Month,getdate ()) as ' month
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.